Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → A__LEN(mark(X))
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → A__LEN(mark(X))
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → A__LEN(mark(X))
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(from(X)) → MARK(X)
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
The remaining pairs can at least be oriented weakly.

MARK(from(X)) → A__FROM(mark(X))
A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Combined order from the following AFS and order.
A__FST(x1, x2)  =  A__FST(x2)
s(x1)  =  s
cons(x1, x2)  =  x1
MARK(x1)  =  x1
fst(x1, x2)  =  fst(x1, x2)
add(x1, x2)  =  add(x1, x2)
len(x1)  =  len(x1)
A__ADD(x1, x2)  =  A__ADD(x2)
0  =  0
from(x1)  =  from(x1)
A__FROM(x1)  =  x1
mark(x1)  =  mark(x1)
a__add(x1, x2)  =  a__add(x1, x2)
a__len(x1)  =  a__len(x1)
nil  =  nil
a__from(x1)  =  a__from(x1)
a__fst(x1, x2)  =  a__fst(x1, x2)

Lexicographic path order with status [19].
Quasi-Precedence:
[s, fst2, add2, len1, 0, from1, mark1, aadd2, alen1, nil, afrom1, afst2] > [AFST1, AADD1]

Status:
from1: [1]
fst2: [2,1]
mark1: [1]
AADD1: [1]
0: multiset
s: []
aadd2: [2,1]
nil: multiset
len1: [1]
afst2: [2,1]
add2: [2,1]
afrom1: [1]
alen1: [1]
AFST1: [1]


The following usable rules [14] were oriented:

mark(cons(X1, X2)) → cons(mark(X1), X2)
a__add(0, X) → mark(X)
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
a__len(nil) → 0
a__from(X) → from(X)
mark(nil) → nil
mark(len(X)) → a__len(mark(X))
a__from(X) → cons(mark(X), from(s(X)))
a__len(cons(X, Z)) → s(len(Z))
mark(s(X)) → s(X)
mark(0) → 0
a__len(X) → len(X)
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
a__fst(X1, X2) → fst(X1, X2)
mark(from(X)) → a__from(mark(X))
a__add(s(X), Y) → s(add(X, Y))
a__fst(0, Z) → nil
a__add(X1, X2) → add(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ QDPOrderProof
QDP
                  ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.

A__FROM(X) → MARK(X)
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
from(x1)  =  from(x1)
A__FROM(x1)  =  A__FROM(x1)
mark(x1)  =  x1
cons(x1, x2)  =  cons(x1)
a__add(x1, x2)  =  a__add(x1, x2)
0  =  0
add(x1, x2)  =  add(x1, x2)
a__len(x1)  =  x1
nil  =  nil
a__from(x1)  =  a__from(x1)
len(x1)  =  x1
s(x1)  =  s
a__fst(x1, x2)  =  x2
fst(x1, x2)  =  x2

Lexicographic path order with status [19].
Quasi-Precedence:
[MARK1, AFROM1] > [0, nil]
[from1, afrom1] > cons1 > s > [0, nil]
[aadd2, add2] > s > [0, nil]

Status:
from1: [1]
add2: [1,2]
MARK1: [1]
afrom1: [1]
AFROM1: [1]
0: multiset
s: []
aadd2: [1,2]
cons1: [1]
nil: multiset


The following usable rules [14] were oriented:

a__add(0, X) → mark(X)
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__len(nil) → 0
a__from(X) → from(X)
mark(nil) → nil
mark(len(X)) → a__len(mark(X))
a__from(X) → cons(mark(X), from(s(X)))
a__len(cons(X, Z)) → s(len(Z))
mark(0) → 0
mark(s(X)) → s(X)
a__len(X) → len(X)
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
a__fst(X1, X2) → fst(X1, X2)
mark(from(X)) → a__from(mark(X))
a__add(s(X), Y) → s(add(X, Y))
a__fst(0, Z) → nil
a__add(X1, X2) → add(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ QDPOrderProof
                ↳ QDP
                  ↳ QDPOrderProof
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.